package com.zjw.enums;


public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    SYSTEM_ERROR(500, "出现错误"),
    USERNAME_EXIST(501, "用户名已存在"),
    PHONENUMBER_EXIST(502, "手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    ARTICLE_NO_EXIST(505, "查询文章不存在"),
    LOGIN_ERROR(505, "用户名或密码错误"),
    LOGIN_INFO_UNCOMPLETED(506, "用户名或密码不完整"),
    TEXT_ISNULL(508, "文本不能为空"),
    FILE_TYPE_ERR(509, "文件类型错误"),
    DATA_UNCOMPLETED(600, "数据不完整"),

    DATA_INVALID_CHECK(601,"数据无效, 检查数据有效性"),

    REMOVE_FAIL(602, "删除失败"),

    EXPORT_FAIL(603, "导出失败!"),

    MENU_HAS_SUB(604, "目录有子菜单或按钮，请删除后再操作"),

    JWT_ERR(507, "token过期或非法");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}